package cn.jee.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.MessageSource;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;


@Controller
@RequestMapping("/i18n")
public class I18NController {
  @Autowired
  MessageSource messageSource;
  //  @ResponseBody
  @RequestMapping("/demo")
  public String demo(Model model){
//    return messageSource.getMessage("disk",null,null);
    model.addAttribute("name","zhang");
    model.addAttribute("age",21);
    return "i18n_res";
  }
}
